I'm unable to set the error received from the json response